package main.java.design.prototype;

/**
 * <p>
 *     原型模式
 * </p>
 *
 * @author : wangdejian
 * @version 1.0
 * @date : 2020/6/10 22:57
 */
public class Client {

    public static void main(String[] args) {
        ShaunTheSheep sheep = new ShaunTheSheep("小羊肖恩", "黑色");

        ShaunTheSheep sheepClone = (ShaunTheSheep) sheep.createClone();

        System.out.println(sheepClone);
        System.out.println(sheep.getSheepName().hashCode() == sheepClone.getSheepName().hashCode());

    }
}
